package 常用api;

public class stringbuilder {
    public static void main(String[] args) {
        //        stringbuffer和stringbuilder用法差不多
//        但是stringbuffer线程安全,builder线程不安全
        StringBuilder sb = new StringBuilder();
        sb.append("喵喵喵").append("~").reverse();
        System.out.println(sb);
        System.out.println(sb.length());
        System.out.println(sb.substring(2,3));
        System.out.println(sb.charAt(3));
    }
}
